import {RouterModule,Routes} from "@angular/router";
import {NgModule} from "@angular/core";
import { AppComponent } from './app.component';
import { HomeComponent } from './home/home.component';
import { WorkAddComponent } from './work-add/work-add.component';
import { PersonScreeningComponent } from './person-screening/person-screening.component';
import { WorkModifyComponent } from './work-modify/work-modify.component';
import { ProjectScreeningComponent } from './project-screening/project-screening.component';
import { WorkDeailComponent } from './work-deail/work-deail.component';
import { PersonTatalComponent } from './person-tatal/person-tatal.component';
import { ProjectTotalComponent } from './project-total/project-total.component';
import { WorkAuditComponent } from './work-audit/work-audit.component';

const routes:Routes=[
{ path: 'home',component: HomeComponent},
{ path: 'workAdd',component: WorkAddComponent},
{ path: 'PersonScreening/:flag',component: PersonScreeningComponent},
{ path: 'ProjectScreening',component: ProjectScreeningComponent},
{ path: 'WorkDeail',component: WorkDeailComponent},
{ path: 'WorkModify',component: WorkModifyComponent},
{ path: 'PersonTatal/:flag',component: PersonTatalComponent},
{ path: 'ProjectTotal/:flag',component: ProjectTotalComponent},
{ path: 'WorkAudit',component: WorkAuditComponent},
{ path: '',redirectTo:"home",pathMatch: 'full'},
// { path: '**',component: HomeComponent}
];

@NgModule({
  imports: [ RouterModule.forRoot(routes,{useHash: true}) ],
  exports: [ RouterModule ]
})
export class AppRoutingModule {}